﻿using System.Windows.Data;
using System.Windows;
namespace DeepEarth.Map.Core.Converters
{

    // TODO: Delete this - Point to Position Origin converter should work in all cases
    public class PositionOriginToPointConverter : IValueConverter
    {
        public static Point Convert(PositionOrigin po)
        {
            return new Point { X = po.X, Y = po.Y };
        }

        public static PositionOrigin ConvertBack(Point p)
        {
            return new PositionOrigin { X = p.X, Y = p.Y };
        }

        public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return Convert((PositionOrigin)value);
        }

        public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return ConvertBack((Point)value);
        }
    }
}
